<template>
    <div id="organization">
        <el-tabs v-model="activeKey" type="card">
            <el-tab-pane name="bank">
                <span slot="label">银行信息</span>
                <BankInformation :instructionSelect="instructionSelect" :outerAppraiseSelect="outerAppraiseSelect"></BankInformation>
            </el-tab-pane>
            <el-tab-pane name="issuer">
                <span slot="label">发行人信息</span>
                <IssuerInformation :instructionSelect="instructionSelect" :outerAppraiseSelect="outerAppraiseSelect"></IssuerInformation>
            </el-tab-pane>
            <el-tab-pane name="counterparty">
                <span slot="label">交易对手信息</span>
                <CounterpartyInformation :instructionSelect="instructionSelect" :outerAppraiseSelect="outerAppraiseSelect"></CounterpartyInformation>
            </el-tab-pane>
            <el-tab-pane name="grouping">
                <span slot="label">交易对手分组信息</span>
                <GroupingInformation></GroupingInformation>
            </el-tab-pane>
        </el-tabs>
    </div>
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
import BankInformation from './external-agency-query/bank-information.vue';
import IssuerInformation from './external-agency-query/issuer-information.vue';
import CounterpartyInformation from './external-agency-query/counterparty-information.vue';
import GroupingInformation from './external-agency-query/grouping-information.vue';
@Component({
    name: 'ExternalAgencyQuery',
    components: {
        BankInformation,
        IssuerInformation,
        CounterpartyInformation,
        GroupingInformation,
    },
})
export default class ExternalAgencyQuery extends Vue {
    activeKey: string = 'bank';
    private instructionSelect: any[] = []; // 内部评级下拉框
    private outerAppraiseSelect: any[] = []; // 外部评级下拉框

    mounted() {
        this.getInsideAppraise();
        this.getOuterAppraise();
    }
    //  获取内部评级下拉框
    private getInsideAppraise(): void {
        this.$axios.get('/tnBank/queryInsideAppraise').then((res: any) => {
            // console.log('内部：', res);
            this.instructionSelect = res;
        });
    }
    //  获取外部评级下拉框
    private getOuterAppraise(): void {
        this.$axios.get('/tnBank/queryOuterAppraise').then((res: any) => {
            // console.log('外部：', res);
            this.outerAppraiseSelect = res;
        });
    }
}
</script>
<style lang="scss" scoped>
#organization {
    min-width: 1200px;
    height: 100vh;
    overflow: hidden;
    background: #fff;
    // padding-top: 10px;
    // border: 1px solid red;
}
/deep/ .el-tabs__item {
    // color: red;
    width: 200px;
    height: 40px;
    font-size: 14px;
}
</style>
